// this program is to check how many common numbers are coming out while you throw the two dice.
import java.util.Scanner;

public class DiceProblemjavaAndC3 {
	public static void main(String args[])
	{
		int i1 = 0, i2 = 0, i3 =0, i4 = 0, point = 0, sum ;
				
		for(int i=0; i < 100; i++)
		{	
		
		int dice1 = (int)(Math.random()*(6-1+1))+1;
		int dice2 = (int)(Math.random()*(6-1+1))+1;
		 sum = dice1 + dice2;
		
			 if ((sum == 7) || (sum == 11))
			 	     i1 ++ ;  
				
			 else if ((sum == 2) || (sum == 3) || (sum == 12))
				 i2 ++;
				 
			 else 
			
				 do  {	 
				 dice1 = (int)(Math.random()*(6-1+1))+1;
				 dice2 = (int)(Math.random()*(6-1+1))+1;
				 point = dice1 + dice2;
				 }while ((point != 7) && (point != sum));
				 
					 if (point == sum)
						 i3 ++; 
					 else if (point == 7) 
						 i4++; 
			 }
		 System.out.println("First win is " + i1 + " times.");
		 System.out.println("First lost is " + i2 + " times.");
		 System.out.println("Win with points are " + i3 + " times.");
		 System.out.println("Lost with points are " + i4 + " times.");
		
		}
		
		
	}


